<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul class="nav">
        <li>我的课程</li>
        <li>首页</li>
        <li>目录</li>
        <li>联系方式</li>
    </ul>
    <script>
        // const nav = document.querySelector('.nav')
        const nav = document.querySelectorAll('ul li')

        console.log(nav)
    </script>
</body>
</html>